package com.zds.support.constant

import com.zds.support.util.AppUtils
import com.zds.support.util.PreferenceUtils


object UrlConstatns {

    const val KEY_API_SERVER_URL = "key_api_server_url_1";

    const val DEFAULT_CONNECT_TIME_OUT = 30L
    const val DEFAULT_WRITE_TIME_OUT = 60L
    const val DEFAULT_READ_TIME_OUT = 60L

    /**
     * 域名HOST
     */
    val BASE_HOST = "http://18.163.25.249:8090"


    fun getReleaseHost(): String {
        return BASE_HOST;
    }

    fun setReleaseHost() {
        setHost(BASE_HOST)
    }

    fun setHost(url: String) {
        PreferenceUtils.putString(
            AppUtils.appContext,
                KEY_API_SERVER_URL, url)
    }

    fun getHost(): String {
        val host = PreferenceUtils.getString(AppUtils.appContext,
                KEY_API_SERVER_URL, BASE_HOST)
        return host
    }


}